package com.study.json;

import com.alibaba.fastjson.JSON;

import java.util.Date;

/**
 * json序列化问题
 *
 * @author yyb8152
 * @since 20220419
 **/
public class MyJson {
    public static void main(String[] args) {
        TaskStateFinishMessageMO finishMessageMO = new TaskStateFinishMessageMO();
        finishMessageMO.setCustomerId(21323213L);
        finishMessageMO.setAsyncNumber("23343432213");
        finishMessageMO.setFinishDate(new Date());
        String jsonString = JSON.toJSONString(finishMessageMO);
        System.out.println(jsonString);

        User user = JSON.parseObject(jsonString, User.class);
        System.out.println(user.getFinishDate());


    }
}
